import time

from appium import webdriver

# 创建了一个空字典
desired_caps = dict()
# 平台的名字
desired_caps['platformName'] = 'android'
# 手机的版本
desired_caps['platformVersion'] = '5'
# 设备的名字
desired_caps['deviceName'] = 'huawei p30'
# 要打开的程序的包名
desired_caps['appPackage'] = 'com.android.contacts'
# 要打开的程序的界面名
desired_caps['appActivity'] = '.activities.PeopleActivity'

driver = webdriver.Remote('http://192.168.41.134:4723/wd/hub', desired_caps)

driver.find_element_by_id("com.android.contacts:id/floating_action_button").click()
driver.find_element_by_xpath("//*[@text='本地保存']").click()
driver.find_element_by_xpath("//*[@text='姓名']").send_keys("zs")
driver.find_element_by_xpath("//*[@text='电话']").send_keys("18888888888")


driver.find_element_by_id()